package crossjob;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * Created by zhaopeng on 2/7/17.
 */
public class CrossJobMapper extends Mapper<LongWritable, Text, Text, IntWritable> {

    private IntWritable writeValue = new IntWritable();

    public void map(LongWritable keys, Text values, Context context) throws IOException, InterruptedException {
        if (values.toString().trim().length() <= 0)
            return;
        writeValue.set(0);
        context.write(values, writeValue);
    }

}



